﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using KeRui.Common;
using System.Collections.Generic;

public partial class Manage_Seller_AdList : System.Web.UI.Page
{
    protected List<KeRui.Model.Ad> AdList;
    protected int state = -1;
    protected int siteID = -1;
    protected KeRui.BLL.CmsSite bllCmsSite = new KeRui.BLL.CmsSite();
    protected DataSet dsCmsSite = new DataSet();
    protected void Page_Load(object sender, EventArgs e)
    {
        ManageHelper.CheckAdminLogin();//登陆判断
        siteID = PageRequest.GetInt("siteID", -1);
        ManageHelper.CheckAdminPower("site_adview_" + siteID);//权限--商户管理
        KeRui.BLL.Ad bllAd = new KeRui.BLL.Ad();
        AdList = bllAd.GetList(siteID);
        //KeRui.BLL.CmsServer bllCmsServer = new KeRui.BLL.CmsServer();
        //int ServerID = bllCmsServer.GetServerIDByIP(PageRequest.GetServerIP());
        dsCmsSite = bllCmsSite.GetDataSet();
    }

    #region 获取商户状态
    protected string GetState(int state)
    {
        string StrRet = "";///0锁定 1正常 2申请中 3
        switch (state)
        {
            case 0:
                StrRet = "<font style=\"color:red\">锁定</font>";
                break;
            case 1:
                StrRet = "正常";
                break;
            case 2:
                StrRet = "申请中";
                break;
            case 3:
                StrRet = "试用中";
                break;
            default: break;
        }
        return StrRet;
    }
    #endregion
}
